package com.learn.servloader.switches;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SwitchTest implements CommandLineRunner {

    /**
     * 方式一：使用 switch 方式，耦合性显得有点强
     */
    @Autowired
    private ParseClient parseClient;

    @Override
    public void run(String... args) throws Exception {
        List list = parseClient.getAll(ContentType.JSON);
        System.out.println("list = " + list.size());
    }

}
